﻿using Parylene_CVD.Model.DModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Parylene_CVD.DAL
{
    public class ParameterDAL : BaseDAL<Parameter>
    {
        public List<Parameter> GetAllParameter()
        {
            return GetModelList("");
        }

        public List<Parameter> GetParameter(string strWhere, string strCols)
        {
            return GetModelList(strWhere, strCols, null);
        }



        public int AddParameter(Parameter Parameter, string strCols)
        {
            int a = Add(Parameter, strCols, 0);
            return a;
        }

        public bool AddListParameter(List<Parameter> Parameters, string strCols)
        {
            bool a = AddList(Parameters, strCols);
            return a;
        }

        public bool UpdataParameter(Parameter Parameter, string strCols)
        {
            return Update(Parameter, strCols);
        }
        public bool UpdataParameter(Parameter Parameter, string strCols, string strWhere)
        {
            return Update(Parameter, strCols, strWhere, null);
        }
        public bool UpdataListParameter(List<Parameter> Parameters, string strCols)
        {
            return UpdateList(Parameters, strCols);
        }

        public bool DeleteParameterByID(object id)
        {
            return Delete(id);
        }

        public bool DeleteParameter(string strWhere)
        {
            return Delete(strWhere, null);
        }

        public bool DeleteListParameterByID(List<object> idList)
        {
            return DeleteList(idList);
        }
    }
}
